package main

import (
	"flag"
	"fmt"
	"os"
	"path/filepath"
)

var wd = func() string {
	wd, err := os.Getwd()
	if err != nil {
		wd = filepath.Dir(os.Args[0])
	}
	return wd
}()

var configPath = flag.String("c", wd+"/config.toml", "config file path")
var version = flag.Bool("v", false, "display the version")

func init() {
	flag.Parse()
	if *version {
		fmt.Println(`
--------------------------------------------	
	oschina git hook tool
	author: doomsplayer@gmail.com
--------------------------------------------
version:`, VERSION)
		os.Exit(0)
	}
}
